package de.jmda.core.util.fileset;

import java.io.File;
import java.util.Set;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import de.jmda.core.util.fileset.FileSet.RuleSetUpdateMode;


/**
 *
 */
@XmlRootElement
public class FileSetDirectoriesOrJarsOnly
{
	@XmlElement
	private FileSet fileSet = new FileSet();
	
	@XmlElement
	private FileFilterDirectoriesAndJarsOnly fileFilter =
			new FileFilterDirectoriesAndJarsOnly();
	
	public void includeDirectory(
			File directory, RuleSetUpdateMode ruleSetUpdateMode)
	{
		fileSet.includeDirectory(directory, fileFilter, ruleSetUpdateMode);
	}
	
	public void includeDirectoryRecursive(
			File directory, RuleSetUpdateMode ruleSetUpdateMode)
	{
		fileSet.includeDirectoryRecursive(directory, fileFilter, ruleSetUpdateMode);
	}
	
	public Set<File> calculateFileSet()
	{
		return fileSet.calculateFileSet();
	}
}